package com.testing.sunnycommon.automation.model;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @Classname AutoResult
 * @Description 类型说明
 * @Date 2023/5/19 20:29
 * @Created by 特斯汀Roy
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class AutoResult {
    private StatusType status;
    private String info;
    private String screenShotPath = "";

    public static AutoResult pass(String info) {
        return new AutoResult(StatusType.PASS, info, "");
    }

    public static AutoResult fail(String info, String screenShotPath) {
        return new AutoResult(StatusType.FAIL, info, screenShotPath);
    }

    public static AutoResult skipped(String info) {
        return new AutoResult(StatusType.SKIPPED, info, "");
    }

}
